package net.vsspl.pojo;

import org.joda.time.DateTime;
import org.joda.time.Days;
import org.joda.time.Hours;

public class JodaTest {

	public static void main(String[] args) {
		DateTime dateTime = new DateTime();//Current time
		DateTime dateTime1 = new DateTime().plusDays(3);
		DateTime dateTime2 = new DateTime().minusDays(2);
      Date date = dateTime.toDate();
		System.out.println(dateTime1.toString());//yyyy-MM-ddTHH:mm:ss.SSSZZ
		Days days = Days.daysBetween(dateTime2,dateTime1);
		Hours hours = Hours.hoursBetween(dateTime2, dateTime1);
		System.out.println(days.getDays());
		System.out.println(hours.getHours());
	}

}
